<!DOCTYPE html>
<html>
<head>
    <title>InterracialMatch</title>
    <meta http-equiv=Content-Type content="text/html" charset='utf-8'>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="telephone=no" name="format-detection">
    <meta name="keywords" content="interracial, interracial dating, interracial romance, interracial relationship, interracial online, interracial match maker, interracial personals, single interracial matchmaking, interracial, interracial men, interracial women, interracial singles, catholic personals, dating service, personal ads, personals, free personals, photo personals, online dating personals, interracial mingle, races, racial, multiracial, biracial, ethnic, multiethnic, cross-culture, Black, Latin American, Latin, caucasian, Asian, American Indian, Hispanic, African-American.">
    <meta name="description" content="InterracialMatch.com is the best and largest dating site for singles of all races dating interracially. Including Black, White, Mixed Races and more!">
    <meta name="classification" content="interracial, interracial dating, interracial online dating, interracial personals, interracial singles, interracial matchmaking">
    <link rel="apple-touch-icon-precomposed" sizes="57x57" href="./static/resource/irm/img/57.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="./static/resource/irm/img/72.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="./static/resource/irm/img/114.png">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="./static/resource/irm/img/144.png">
</head>
<body>
</body>
    <script src="http://images.commercialless.com/seajs/2.3.0/sea.js"></script>
    <script src="http://images.commercialless.com/seajs/2.3.0/seajs-css.js"></script>
    <script src="http://images.commercialless.com/seajs/2.3.0/seajs-text.js"></script>
    <script>
    // For development
    if (location.href.indexOf("?dev") > 0) {
        var engine = 'irm',
        oldSite = 'http://m.interracialmatch.com',
        mainSite = 'http://www.interracialmatch.com',
        domain = 'http://www.irm.com',
        remoteUrl = 'http://static.irm.com',
        messageName = 'masonsoft';
    } else if (location.href.indexOf("?irm") > 0) {
        var engine = 'irm',
        oldSite = 'http://m.interracialmatch.com',
        mainSite = 'http://www.interracialmatch.com',
        domain = 'http://mirm.masonsoft.com',
        remoteUrl = 'http://staticmirm.masonsoft.com',
        messageName = 'masonsoft';
    } else {
        var engine = 'irm',
        oldSite = 'http://m.interracialmatch.com',
        mainSite = 'http://www.interracialmatch.com',
        domain = 'http://mobile.interracialmatch.com',
        remoteUrl = 'http://static.interracialmatch.com';
        messageName = 'interracialmatch';
    }

    seajs.config({
        alias: {
            "lang" :  remoteUrl+"/site/"+engine+"/i18n/"+getLocale()+".js",
            "$": "zepto/zepto.min.js",
            "util": "util/util.js",
            "share": "/static/site/"+engine+"/share.js",
            "underscore": "gallery/underscore/1.4.4/underscore.js",
            "backbone": "gallery/backbone/1.0.0/backbone.js",
            "msgcore": "candy/message.core.js",
            "candy": "candy/candy.js",
        },

        preload: [
            '$','backbone','underscore'
        ],

        paths: {
            'gallery': remoteUrl+'/component/gallery'
        },

        vars: {
            'locale': getLocale(),
            'component': remoteUrl+'/component/', 
            
            'engine' : engine,

            'controller' : domain+'/static/site/'+engine+'/controller/',

            'view': domain+'/static/site/'+engine+'/view/',
            'site' : domain+'/static/site/'+engine+'/',

            'resourceUrl': domain+'/static/resource/'+engine+'/',
            
            'apiUrl': domain+'/apis/',
            'apiAccessUrl': domain+'/apis/'+getCookie('session_id')+'/',

        },

        'map': [
                //[/^(.*\.(?:css|js))(.*)$/i, '$1?v='+Math.random()]
                [/^(.*\.(?:css|js|tpl))(.*)$/i, '$1?v=1.0']
        ],

        debug: true,

        base: remoteUrl+'/component/',

        charset: 'utf-8'
    });


    function getLocale(){
        var locale = getCookie('siteLocale');
        return locale == '' ? 'en' : local;
    };

    function getCookie(name) {
        var search = name + "=",offset,end; 
        if(document.cookie.length > 0) { 
            offset = document.cookie.indexOf(search);
            if(offset != -1) { 
                offset += search.length;
                end = document.cookie.indexOf(";", offset); 
                if(end == -1) {
                    end = document.cookie.length;
                };
                return decodeURI(document.cookie.substring(offset, end));
            } 
        }
        return "";
    };

    seajs.use(['$','backbone','underscore','util','share','lang','msgcore'],function($,backbone,underscore,util,share,lang,msgcore){
        //Global
        window.Backbone = backbone;
        window._ = underscore;
        window.$ = $;
        window.util = util;
        window.share = share;
        window.lang = lang;
        seajs.use(remoteUrl+"/site/"+engine+"/main");
    })

    </script>
</html>
